#!/usr/bin/python2.5

import optparse
import sys

parser = optparse.OptionParser()
parser.add_option("-n", "--num-tanks", default=2, type=int)
parser.add_option("-d", "--fight-duration", default=120, type=int)
parser.add_option("", "--base-plague-damage", default=193, type=int)
parser.add_option("", "--tick-timing", default=12, type=int)

options, args = parser.parse_args(sys.argv)
num_tanks = options.num_tanks
fight_duration = options.fight_duration
base_dmg = options.base_plague_damage
tick_timing = options.tick_timing

current_tank = 0
tank_stacks = [0] * num_tanks
fmt = "%4d " + " ".join(["%2d"] * num_tanks) + " " + " ".join([" %5d"] * num_tanks) + " %6d"
for t in range(fight_duration):
  if (t % tick_timing) == 0:
    tank_stacks[current_tank] += 1
    current_tank = (current_tank + 1) % num_tanks
  row_data = [t]
  row_data += tank_stacks
  total_damage = 0
  for idx, stack_size in enumerate(tank_stacks):
    if stack_size > 0:
      row_data.append(int(base_dmg * 2.5 ** (stack_size - 1)))
    else:
      row_data.append(0)
    total_damage += row_data[-1]
  row_data.append(total_damage)
  print fmt % tuple(row_data)
